#!/usr/bin/env python
# -*- coding:utf8 -*-
# uncompyle6 version 2.15.1
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.10 (default, Jul  1 2017, 13:36:56) 
# [GCC 4.4.6 20110731 (Red Hat 4.4.6-4)]
# Embedded file name: /data/bkce/open_paas/paas/templates_module/resource/index.html.py
# Compiled at: 2018-01-02 12:00:05
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
STOP_RENDERING = runtime.STOP_RENDERING
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 10
_modified_time = 1514865605.390887
_enable_loop = True
_template_filename = '/data/bkce/open_paas/paas/templates/resource/index.html'
_template_uri = 'resource/index.html'
_source_encoding = 'utf-8'
_exports = [u'right_content']

def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]


def _mako_generate_namespaces(context):
    pass


def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'/base_center.html', _template_uri)


def render_body(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)

        def right_content():
            return render_right_content(context._locals(__M_locals))

        resources = context.get('resources', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'
')
        if 'parent' not in context._data or not hasattr(context._data['parent'], 'right_content'):
            context['self'].right_content(**pageargs)
        __M_writer(u'
')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_right_content(context, **pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:

        def right_content():
            return render_right_content(context)

        resources = context.get('resources', UNDEFINED)
        __M_writer = context.writer()
        __M_writer(u'
<div class="">
    <div class="box-info full">
        <div class="main-header">
            <span>
                资源下载
            </span>
        </div>
')
        if resources:
            __M_writer(u'          <div class="download-list">
')
            for i in resources:
                __M_writer(u'                <div class="download-item">
                    <div class="download-logo">
                        <img src="')
                __M_writer(unicode(i.icon_url_display))
                __M_writer(u'" alt="">
                    </div>
                    <div class="download-detail">
                        <h5 class="download-title">')
                __M_writer(unicode(i.name))
                __M_writer(u'</h5>
                        <div class="download-metadata">
                            <span class="download-version">版本号：')
                __M_writer(unicode(i.version_display))
                __M_writer(u'</span>
                            <span class="download-size">大小：')
                __M_writer(unicode(i.size_display))
                __M_writer(u'</span>
                        </div>
                        <a href="')
                __M_writer(unicode(i.download_url_display))
                __M_writer(u'" class="download-btn" target="_blank">下载</a>
')
                if i.doc_url:
                    __M_writer(u'                        <a href="')
                    __M_writer(unicode(i.doc_url))
                    __M_writer(u'" class="doc-url-btn" target="_blank">查看文档</a>
')
                __M_writer(u'                    </div>
                </div>
')

            __M_writer(u'          </div>
')
        else:
            __M_writer(u'          <div class="paas-no-item">无可用资源</div>
')
        __M_writer(u'    </div>
</div>
')
        return ''
    finally:
        context.caller_stack._pop_frame()
